import request from '@/utils/request'

// 查询
export function list(){

  return request({
    url: '/inspection/db/list',
    method: 'get'
  })
}
export function getUser(){

  return request({
    url: '/inspection/db/getUser',
    method: 'get'
  })
}

// 查询统计
export function listStatic(formDataOn) {
  return request({
    url: '/plan/schedule/listStatic',
    method: 'get',
    params: formDataOn
  })
}
// 查询统计
export function listArea() {
  return request({
    url: '/plan/schedule/listArea',
    method: 'get',
  })
}
export function listWork(formData) {
  return request({
    url: '/plan/schedule/wsworkorders',
    method: 'get',
    params: formData
  })
}

// 查询文件上传列表
export function listWorkFile(query) {
  return request({
    url: '/app/file/list',
    method: 'get',
    params: query
  })
}

// 查询统计
export function listPcount() {
  return request({
    url: '/plan/schedule/listPcount',
    method: 'get',
  })
}

// 查询检查项
export function selectEtList() {
  return request({
    url: '/plan/schedule/selectEtList',
    method: 'get',
  })
}// 查询所有设备类型
export function selectCiList() {
  return request({
    url: '/plan/schedule/selectCiList',
    method: 'get',
  })
}




// 查询定时任务调度详细
export function getPlan(formDataOn) {
  return request({
    url: '/checkplan/plan/list',
    method: 'get',
    params: formDataOn
  })
}
// 查询定时任务调度详细
export function getInspectionRecord() {
  return request({
    url: '/inspection/db/getInspectionRecord',
    method: 'get',
  })
}


// 查询定时任务调度详细
export function getFaultDeclaration() {
  return request({
    url: '/inspection/db/getFaultDeclaration',
    method: 'get',
  })
}


// 查询设备
export function deviceList(data){

  return request({
    url: '/inspection/db/deviceList',
    method: 'get',
    params: data
  })
}

// 查询设备
export function getSchedules(){

  return request({
    url: '/inspection/db/getSchedules',
    method: 'get',
  })
}
// 查询设备
export function getUsers(){

  return request({
    url: '/inspection/db/getUsers',
    method: 'get',
  })
}
// 查询设备
export function getDepts(){
  return request({
    url: '/inspection/db/getDepts',
    method: 'get',
  })
}

// 故障申报
export function faultDeclaration(data){

  return request({
    url: '/inspection/db/faultDeclaration',
    method: 'post',
    data: data
  })
}

// 保存修改
export function inspectionRecordUpload(data){

  return request({
    url: '/inspection/db/inspectionRecordUpload',
    method: 'post',
    data: data
  })
}

// 保存修改
export function saveEdit(data){

  return request({
    url: '/inspection/db/saveEdit',
    method: 'post',
    data: data
  })
}
// 保存修改
export function addCheckingPlan(data){
  return request({
    url: '/checkplan/plan/schedule',
    method: 'post',
    data: data
  })
}



// 恢复默认
export function restore(period){

  return request({
    url: '/inspection/db/restore/'+ period,
    method: 'get',
  })
}

// 新增部门
export function addDept(data) {
  return request({
    url: '/system/dept',
    method: 'post',
    data: data
  })
}


// 查询定时任务调度详细
export function getRegionList() {
  return request({
    url: '/management/region/regionList',
    method: 'get'
  })
}

